package org.jeecg.modules.basic.demo.bed.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 床位信息
 * @Author: jeecg-boot
 * @Date:   2021-01-20
 * @Version: V1.0
 */
@Data
@TableName("lwgy_base_bed")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="lwgy_base_bed对象", description="床位信息")
public class LwgyBedAssignment implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

	/**校区*/
	@Excel(name = "校区", width = 15)
    @ApiModelProperty(value = "校区")
    private String campusId;
    /**校区名字*/
    @TableField(exist = false)
    private String campusName;

	/**楼宇*/
	@Excel(name = "楼宇", width = 15)
    @ApiModelProperty(value = "楼宇")
    private String buildingId;
    /**楼宇名字*/
    @TableField(exist = false)
    private String buildingName;

	/**单元*/
	@Excel(name = "单元", width = 15)
    @Dict(dicCode = "id",dicText = "name",dictTable = "lwgy_base_apartment")
    @ApiModelProperty(value = "单元")
    private String unitId;
    /**单元名字*/
    @TableField(exist = false)
    private String unitName;

	/**楼层*/
	@Excel(name = "楼层", width = 15)
    @ApiModelProperty(value = "楼层")
    private String layerId;
    /**楼层名字*/
    @TableField(exist = false)
    private String layerName;

	/**房间*/
	@Excel(name = "房间", width = 15)
    @Dict(dicCode = "id",dicText = "name",dictTable = "lwgy_base_apartment")
    @ApiModelProperty(value = "房间")
    private String roomId;
    /**房间名字*/
    @TableField(exist = false)
    private String roomName;

    @TableField(exist = false)
    @ApiModelProperty(value = "床位名字")
    private String bedName;

	/**学生*/
	@Excel(name = "学生", width = 15)
    @ApiModelProperty(value = "学生")
    private String studentId;

    @Excel(name = "管理员", width = 15)
    @ApiModelProperty(value = "管理员")
    private String adminId;

    @Excel(name = "真实姓名", width = 15)
    @Dict(dicCode = "id",dicText = "realname",dictTable = "sys_user")
    @ApiModelProperty(value = "真实姓名")
    private String realname;

    /**学生*/
    @Excel(name = "学生", width = 15)
    @Dict(dicCode = "id",dicText = "student_name",dictTable = "lwgy_base_student")
    @ApiModelProperty(value = "学生")
    private String studentName;

    /**学号*/
    @Excel(name = "学号", width = 15)
    @Dict(dicCode = "id",dicText = "student_number",dictTable = "lwgy_base_student")
    @ApiModelProperty(value = "学号")
    private String studentNumber;

    /**性别*/
    @Excel(name = "性别", width = 15, dicCode = "sex")
    @Dict(dicCode = "sex")
    @ApiModelProperty(value = "性别")
    private String studentSex;

	/**床位号*/
	@Excel(name = "床位号", width = 15)
    @ApiModelProperty(value = "床位号")
    private String bedCode;

	/**床位价格*/
	@Excel(name = "床位价格", width = 15)
    @ApiModelProperty(value = "床位价格")
    private String bedPrice;

	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;


    @TableField(exist = false)
    private String type;

    @TableField(exist = false)
    @Dict(dicCode = "sex")
    private String roomSex;

    @TableField(exist = false)
    @Dict(dicCode = "whether_check")
    private String isBed;

    @TableField(exist = false)
    @Dict(dicCode = "whether_allot")
    private String isAdminId;

    /**
     * 删除状态（0，正常，1已删除）
     */
    @Excel(name = "删除状态", width = 15,dicCode="del_flag")
    @TableLogic
    private Integer delFlag;


}
